Forum Activity for @douglas

douglas
@douglas
06/18/16 07:28:49AM
2,806 posts

How to add the who is online for the entire site?


Using Jamroom

pch:
1) I am still showing online after logging out. Even after refreshing the page from time to time, it takes something like 15 or 20 minutes (i guess so) before JR removes a logged out user from the Who is online. I have noticed the same here in the JR forum. Is it possible to reduce that delay?

This is most likely a cache issue, if your testing on your site, turn dev mode on so caching isn't an issue. ACP > Developer > Developer Tools > Global Config > Run In Developer Mode

https://www.jamroom.net/the-jamroom-network/documentation/modules/932/developer-tools

be sure to turn if off when your site is live.

pch:
2) There seems to be a duplication. I have been shown as myself then as a guest. (Admin profile icon) + 1 Guest. I doubt that it was a really guest. I think that, that guest was still me. I am more than sure that there wasn't anybody else on the site apart from me. I am the only one using it right now because it is under reconstruction. When JR removed me from the Who is online, the guess was gone too. I realized that I was probably that Guest. (I am not quite sure).
I have even noticed it here in the JR forum. There is a moment I was the only one logged in, the Who is online, displays my profile + 1 Guest.

This is probably due to caching as well, it saw you as a guest before you logged in, and then as the logged in user, try resetting your cache, ACP > System Tools > Reset Cache, and clear your browser cache as well. lf you turn dev mode on as mentioned above, you shouldn't see this issue at all and you shouldn't have to reset your cache.

pch:
- Do Profiles with privacy set to "Shared - Profile Owners and Followers only" show on the Who is online?

From looking at the code, the who is online function does not take into consideration if the profile is private or not.

pch:
- What about if a site has let's say 200 members and 120 of them are online simultaneously, Will all the 120 profiles (profile picture by profile picture) be displayed and an horizontal scrollbar be created in the Who i online? How will JR handle this scenario?

The code posted will just show a list without scroll bars, if you want scroll bars you would need to modify the code to do so. You could wrap it in a div with the overflow set to auto... ie.

<div style="height:72px;overflow:auto;">
    the rest of the code here...
</div>

pch:
- I created a language string for the phrase: "user(s) currently active on this site" and it displays fine on the site but the language string for "Guest" doesn't display the text, it displays the code because "Guest" is hardcoded:
{if $visitor_count == 1}
{$gs = 'Guest'}
{else}
{$gs = 'Guests'}
{/if}
We probably need two language strings for "Guest": "Guest" in singular (when guest == 1) and "Guests" in plural. How to do that in the code you posted? (I am building a multilingual site)
Thanks

If you have created language strings in your language file for "Guest" and "Guests" then change this:

{if $visitor_count == 1}
{$gs = 'Guest'}
{else}
{$gs = 'Guests'}
{/if}

to this:

{if $visitor_count == 1}
{jrCore_lang skin=$_conf.jrCore_active_skin id="#" default="Guest"  assign="gs"}
{else}
{jrCore_lang skin=$_conf.jrCore_active_skin id="#" default="Guests"  assign="gs"}
{/if}

be sure to change the # to the correct number for those language strings.

Hope this helps!
updated by @douglas: 06/18/16 07:30:48AM
douglas
@douglas
06/17/16 11:09:15AM
2,806 posts

How to add the who is online for the entire site?


Using Jamroom

Most likely hidden characters when you pasted it into notepad, don't use notepad for code work. Try a different editor, like crimson editor.

http://www.crimsoneditor.com/
douglas
@douglas
06/17/16 09:59:04AM
2,806 posts

How to add the who is online for the entire site?


Using Jamroom

This should work:

    <div class="container">
        <div class="row">
            <div class="col12 last">

                <div class="block">
                    <div class="title" style="border-radius:4px;">
                        <h2>{$all_count} user(s) currently active on this site:</h2>
                    </div>
                    <div class="block_content">
                        <div class="item" style="border-radius:4px;">


                            {* MASTER ADMIN *}
                            {if isset($master)}
                            {foreach from=$master item="m_admin"}
                            <a href="{$jamroom_url}">{jrCore_module_function function="jrImage_display" module="jrUser" type="user_image" item_id=$m_admin.session_user_id size="xsmall" crop="auto" class="iloutline" alt=$m_admin.session_user_name title=$m_admin.session_user_name}</a>&nbsp;
                            {/foreach}
                            {/if}

                            {* SITE ADMIN *}
                            {if isset($admin)}
                            {foreach from=$admin item="s_admin"}
                            <a href="{$jamroom_url}/{$s_admin.profile_url}">{jrCore_module_function function="jrImage_display" module="jrUser" type="user_image" item_id=$s_admin.session_user_id size="xsmall" crop="auto" class="iloutline" alt=$s_admin.session_user_name title=$s_admin.session_user_name}</a>&nbsp;
                            {/foreach}
                            {/if}

                            {* MEMBERS *}
                            {if isset($user)}
                            {foreach from=$user item="member"}
                            <a href="{$jamroom_url}/{$member.profile_url}">{jrCore_module_function function="jrImage_display" module="jrUser" type="user_image" item_id=$member.session_user_id size="xsmall" crop="auto" class="iloutline" alt=$member.session_user_name title=$member.session_user_name}</a>&nbsp;
                            {/foreach}
                            {/if}

                            {* VISITORS *}
                            {jrCore_module_url module="jrImage" assign="iurl"}
                            {if $visitor_count == 1}
                            {$gs = 'Guest'}
                            {else}
                            {$gs = 'Guests'}
                            {/if}
                            <big>+</big>&nbsp;<img src="{$jamroom_url}/{$iurl}/img/module/jrImage/default.png" height="40" width="40" class="img_shadow" alt="{$gs|jrCore_entity_string}"> <i><b>{$visitor_count}</b> {$gs}</i>

                        </div>

                    </div>
                </div>

            </div>
        </div>
    </div>
douglas
@douglas
06/16/16 09:04:36AM
2,806 posts

How to add the who is online for the entire site?


Using Jamroom

I've not tested this, but you can give it a try, it should be close to the forum who is online:

<div class="container">
    <div class="row">
        <div class="col12 last">

            <div class="item">

                {* MASTER ADMIN *}
                {if isset($master)}
                    {foreach from=$master item="m_admin"}
                        <div style="float:left;display:inline-block;margin-right:10px;">
                            {jrCore_module_function function="jrImage_display" module="jrUser" type="user_image" item_id=$m_admin.session_user_id size="xsmall" crop="auto" class="iloutline" alt=$m_admin.session_user_name title=$m_admin.session_user_name}
                        </div>
                    {/foreach}
                {/if}

                {* SITE ADMIN *}
                {if isset($admin)}
                    {foreach from=$user item="member"}
                        <div style="float:left;display:inline-block;margin-right:10px;">
                            {jrCore_module_function function="jrImage_display" module="jrUser" type="user_image" item_id=$member.session_user_id size="xsmall" crop="auto" class="iloutline" alt=$member.session_user_name title=$member.session_user_name}
                        </div>
                    {/foreach}
                {/if}

                {* MEMBERS *}
                {if isset($user)}
                    {foreach from=$user item="member"}
                        <div style="float:left;display:inline-block;margin-right:10px;">

                            {jrCore_module_function function="jrImage_display" module="jrUser" type="user_image" item_id=$member.session_user_id size="xsmall" crop="auto" class="iloutline" alt=$member.session_user_name title=$member.session_user_name}

                        </div>
                    {/foreach}
                {/if}

                {* VISITORS *}
                {if $visitor_count > 1}
                    {jrCore_module_url module="jrImage" assign="iurl"}
                    {if $visitor_count > 1}
                        {$gs = 'Guests'}
                    {else}
                        {$gs = 'Guest'}
                    {/if}
                    <div style="float:left;display:inline-block;">
                        <big>+</big> <img src="{$jamroom_url}/{$iurl}/img/module/jrImage/default.png" height="40" width="40" class="img_shadow" alt="{$gs|jrCore_entity_string}"> <i><b>{$visitor_count}</b> {$gs}</i>
                    </div>
                {/if}

            </div>

        </div>
    </div>
</div>

updated by @douglas: 06/17/16 09:59:32AM
douglas
@douglas
06/16/16 08:13:49AM
2,806 posts

How to get an Header bar under the logo and menu?


Using Jamroom

Since the header is set to a certain height, you'll probably want to create another div under the header div in your header.tpl. Right after this:

<div id="header">
    <div id="header_content">

        {* Logo *}
        {if jrCore_is_mobile_device()}
            <div id="main_logo">
                {jrCore_image id="mmt" skin="jrElastic" image="menu.png" alt="menu"}
                {jrCore_image image="logo.png" width="170" height="40" class="jlogo" alt=$_conf.jrCore_system_name custom="logo"}
            </div>
        {else}
            <div id="main_logo">
                <a href="{$jamroom_url}">{jrCore_image image="logo.png" width="191" height="44" class="jlogo" alt=$_conf.jrCore_system_name custom="logo"}</a>
            </div>
            {jrCore_include template="header_menu_desktop.tpl"}

        {/if}

    </div>

</div>

maybe something like this:

<div class="header_bar">
     <div class="header_bar_content">
        Your code here...
    </div>
</div>

and in your header.css file add this:

.header_bar {
background-color: #333333;
background-image: url("{$jrElastic_img_url}/bckgrd.png");
padding:5px;
margin-top:-12px;
}
.header_bar_content {
max-width: 1140px;
margin-left: auto;
margin-right: auto;
}

of course you may need to adjust the CSS to suite your needs.

Hope this helps!
douglas
@douglas
06/16/16 06:24:35AM
2,806 posts

Changes through the Template editor not showing on the site


Using Jamroom

That depends on if you want whats new/updated/changed in the default skin in your custom skin. Not all updates are critical updates.

Note that your custom/cloned skin will never get changed by an update, since we don't have the custom/cloned skin, we can't make any changes to it. The only changes we make are to default skins.

However, any modifications made via the template editor, ACP > Skins > YourSkin > Templates > Modify, will not be overwritten by an update since those changes are saved in your database.

Hope this helps!
douglas
@douglas
06/16/16 04:38:15AM
2,806 posts

How to change the capitalization of text?


Using Jamroom

What skin did you clone?

You'll want to do this in an editor and not on the style tab.

I can tell you that the h1, h2 etc. tags all have text-transform:capitalize; in the skins html.css file.

Hope this helps!
updated by @douglas: 06/16/16 04:38:34AM
douglas
@douglas
06/16/16 04:36:26AM
2,806 posts

Changes through the Template editor not showing on the site


Using Jamroom

pch:
In case of updates, should we need to compare the new updated skin file (native skin file) with the clone skin, then manually apply the update to the clone skin in order to do not loose the modification done in the clone skin? Please clarify.

There is a compare tool in your ACP > Skins > YOURSKIN > Templates section, you can use if there are updates to a "native" skin that you would like to add to your custom skin.

pch:
Also what about skin files edited outside JR then uploaded to the server through ftp, will JR pick up the change and save it to the database after running the integrity check as it does when creating language strings?
Thanks

No, modifying a template to "native" skins and uploading them via FTP will not be saved to the database, the only time template changes are saved to the database is when you modify them via the template editor in your ACP.

Hope this helps!
  98